﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NETCORE.HTTP.WebAPI.model;
using Newtonsoft.Json;

namespace NETCORE.HTTP.WebAPI.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class personController : ControllerBase
    {


        public personController()
        {

        }


        #region  == Get ==

        [HttpGet]
        [Route("GetByModel1")]
        public IActionResult GetByModel1(int ID, string NAME, DateTime CREATETIME)
        {
            return Ok("ook");
        }


        [HttpGet]
        [Route("GetByModel2")]
        public IActionResult GetByModel2(string strQuery)
        {
            TB_CHARGING oData = JsonConvert.DeserializeObject<TB_CHARGING>(strQuery);

            return Ok("ChargingData：" + JsonConvert.SerializeObject(oData));

        }

        #endregion


        #region == Post  ==
         
        #endregion


    }
}
